﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace PosterMaker
{
    /// <summary>
    /// 海报上的文字类
    /// </summary>
    public class PosterText
    {
        #region 构造函数
        /// <summary>
        /// 初始化海报文字类
        /// </summary>
        /// <param name="content">文本内容</param>        
        /// <param name="point">位置座标</param>
        /// <param name="color">颜色</param>
        public PosterText(string content, PointF point, Color color)
        {
            Content = content;
            Position = point;
            Color = color;
        }

        public string FontName { get; set; }

        public PosterText(string content,  Color color)
        {
            Content = content;            
            Color = color;
        }

        public PosterText()
        {

        }
        #endregion

        #region 属性
        /// <summary>
        /// 海报文字的尺寸,以百分数表示，80相当于=80%
        /// </summary>
        public decimal Size { get; set; }

        /// <summary>
        /// 海报文字的颜色
        /// </summary>
        public Color Color { get; set; }


        /// <summary>
        /// 海报文字的内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 海报文字的位置
        /// </summary>
        public PointF Position
        {
            get;
            set;
        }

        /// <summary>
        /// 海报文字的画笔类
        /// </summary>
        public SolidBrush Brush
        {
            get
            {
                return new SolidBrush(Color);
            }            
        }

        /// <summary>
        /// 文字占比，80表示80%
        /// </summary>
        public float Ratio { get; set; }

        #endregion
    }

    
}
